<template>
  <a-modal
    v-model:open="modalVisible"
    centered
    :keyboard="false"
    :maskClosable="false"
    :closable="true"
    v-bind="$attrs"
    >
    <!-- destroyOnClose -->
    <template #footer>
      <slot name="footer"></slot>
    </template>
    <template #default>
      <slot></slot>
    </template>
  </a-modal>
</template>

<script>
export default {
  props: {
    modelValue: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {};
  },
  computed: {
    modalVisible: {
      get() {
        return this.modelValue;
      },
      set(val) {
        this.$emit("update:modelValue", val);
      },
    },
  },
};
</script>
